package IO流.IO加Properties联合使用.Test01;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashMap;
import java.util.Properties;

public class IoPropertiesTest01 {
    public static void main(String[] args) {
        FileInputStream fis = null;
        try {
            fis = new FileInputStream("D:\\Desktop\\IDEA\\javase\\src\\IO流\\IO加Properties联合使用\\Test01\\jojoInfo.properties");
            Properties pro = new Properties();
            pro.load(fis);
            String s = pro.getProperty("jojoName");
            System.out.println(pro.getProperty("password"));
            System.out.println(s);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally{
            if (fis != null) {
                try {
                    fis.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
